package client;

import gui.Cart_Gui;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Time;

public class Order implements Serializable 
{
	public Object[][] orderItems = null;
	public Object[][] orderCustomItems = null;
	public Object[][] data = null;
	public Object[] DeliveryGreetingData = null;
	public float total = -1;
	public Integer usrId = -1;
	public String getSet = null;
	
	public Order()
	{
		usrId = LogIn.usr.getID();
		getSet = "get";
		ObjHandle.sendToServer(this); 
	}
	
	public Order(float totalPrice, Object[][] Items, Object[][] CustomItems, Object[] DeliveryData) 
	{
		getSet = "set";
		usrId = LogIn.usr.getID();
		total = totalPrice;
		orderItems = Items;
		orderCustomItems = CustomItems;
		DeliveryGreetingData = DeliveryData;
		ObjHandle.sendToServer(this);	
	}
	
	public Object[] cancelCheck(Integer oid)
	{
		Object [] order=new Object[3];
		String sn[]=new String[2];
		sn[0]="cancelCheck";
		sn[1]=oid.toString();
		ObjHandle.sendToServer(sn);
		order=(Object[]) Main.clie.getResult();
		return order;
	}
	public void removeOrder(Integer oid)
	{
		String sn[]=new String[2];
		sn[0]="removeOrder";
		sn[1]=oid.toString();
		ObjHandle.sendToServer(sn);
		
		
	
	}
}
